package com.shiguiwu.springmybatis.designpattern.facade;

/**
 * @description: 外观类，核心类
 * @author: stone
 * @date: Created by 2021/2/26 23:37
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.facade
 */
public class ExGiftFacadeService {
    private QualifyService qualifyService = new QualifyService();
    private PayService payService = new PayService();
    private ShippingService shippingService = new ShippingService();

    public void exGift(PointsGift gift) {
        if (qualifyService.isAvailable(gift)) {
            System.out.println("校验成功。。。。。");
            if (payService.isPaySuccess(gift)) {
                System.out.println("支付成功。。。。");
                String shipping = shippingService.shipping(gift);
                System.out.println("返回订单号。。。" + shipping);

            }
        }
    }

}
